<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <c:set var="root" value="${pageContext.request.contextPath}"/>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script src="../bootstrap/js/jquery.min.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>

    <style type="text/css">
        #biaoti{
            height: 24px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    </style>
    <title>产品列表</title>
</head>
<body>
<div class="col-md-1 column">
</div>
<div class="col-md-10 column">
    <div class="container-fluid">
        <div class="row">
            <c:forEach var="c" items="${page}" varStatus="status">
                <div class="col-xs-2">
                    <div class="thumbnail">
                        <img src="${root}/${c.image}" alt="" style="height: 20%">
                        <div class="caption">
                            <h5 id="biaoti">${c.pname}</h5>
                            <p>市场价：${c["market_price"]}</p>

                            <p>是否热销：
                                <c:if test="${c[\"is_hot\"] eq 1}">是</c:if>
                                <c:if test="${c[\"is_hot\"] ne 1}">否</c:if>
                            </p>
                            <p><a href="${root}/appendui" class="btn btn-default btn-sm" role="button">添加</a>
                                <a href="#" class="btn btn-default btn-sm" role="button">修改</a>
                                <a href="${root}/removeServlet?pid=${c.pid}" class="btn btn-primary btn-sm" role="button">删除</a></p>
                        </div>
                    </div>
                </div>
            </c:forEach>
        </div>
    </div>
</div>
<div class="col-md-1 column">
</div>
</body>
</html>
